home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Texteditors
/
Origami
/
Sources
/
doc
/
Makefile
< prev
next >
Wrap
Makefile
|
1996-09-26
|
5KB
|
162 lines
include ../Configfile
COMMON_HDRS= ../man/o-opt.sed.MAN
BODY= manual.sed.MS token.AMS msg.AMS ../man/o-opt.MAN $(OS_DOC)
all: manual.ascii intro.ascii
lint:
awk: all
-make manual.dvi
-make manual.ps
make clean
do_check_common:check_common
manual.ascii: manual.ms
@echo "generating ascii manual"
nroff -ms manual.ms >manual.ascii
manual.ascii.Z: manual.ascii
compress <manual.ascii >manual.ascii.Z
#{{{}}}
#{{{ automatic generated files
check_common: name.sed
manual.sed.MS: manual.MS name.sed lg.sed ../man/o-opt.sed.MAN
sh name.sed <manual.MS >manual.sed.MS
name.sed lg.sed:../src/h/defaults.h ../src/origami/default.h \
../src/h/envvar_str.h ../src/h/tokens tok2sed.awk \
lg2AMS.awk ../src/h/lg
( echo "ORI_RC_PATH_MANTEXT $(ORIGAMI_RC_PATH)" ;\
echo "ORIGAMI_RC_PATH_STRING $(ORIGAMI_RC_PATH)"; \
echo "KBD_PATH_STRING $(KBD_LIB_PATH)"; \
cat ../src/h/defaults.h \
../src/origami/default.h \
../src/h/envvar_str.h \
../src/h/tokens \
) | $(AWK) -f tok2sed.awk
$(AWK) -f lg2AMS.awk <../src/h/lg >lg.sed
token.AMS: ../src/h/tokens token2MS.awk
@echo "generating list of tokens"
$(AWK) -f token2MS.awk ../src/h/tokens >token.AMS
msg.AMS: ../src/h/msg msg2MS.awk
@echo "generating list of messages"
$(AWK) -F@ -f msg2MS.awk ../src/h/msg >msg.AMS
pre_tc.AMS: pre_tc i2tc.awk
@echo "get size of tc data"
$(AWK) -f i2tc.awk <pre_tc >pre_tc.AMS
pre_tc: $(BODY) tccount.awk pre_ind
@echo "get data for size of tc data"
echo "dummy" >tc.AMS
( cat manual.sed.MS $(OS_DOC) pre_ind ) | soelim | $(AWK) -f tccount.awk >pre_tc
pre_ind: il2doc.awk
echo "dummy |1x" | $(AWK) -f il2doc.awk >pre_ind
#}}}
#{{{ internal rules for nroff
manual.ms: check_common $(BODY) index.AMS a_tc.AMS
@echo "generating ascii nroff source"
cp a_tc.AMS tc.AMS
( echo ".nr tM 0"; echo ".nr gR 0" ; cat manual.sed.MS $(OS_DOC) index.AMS ) | \
soelim | tbl >manual.ms
rm -f tc.AMS
index.AMS: index i2il.awk il2doc.awk
@echo "generating ascii index"
$(AWK) -f i2il.awk index | sort -f | $(AWK) -f il2doc.awk > index.AMS
a_tc.AMS: index i2tc.awk
@echo "generating ascii table of contents"
$(AWK) -f i2tc.awk index >a_tc.AMS
index: pre_ind pre_tc.AMS il2doc.awk
@echo "generating index/tc data (ascii)"
cp pre_tc.AMS tc.AMS
( echo ".nr tM 1"; echo ".nr gR 0"; cat manual.sed.MS $(OS_DOC) pre_ind ) | \
soelim |tbl | nroff -ms >/dev/null 2>index
#}}}
manual.dvi: gdmanual.AMS
@echo "generating dvi manual"
groff -t -ms -Tdvi gdmanual.AMS >manual.dvi
#{{{ internal rules for groff -Tdvi
gdmanual.AMS: check_common $(BODY) gdindex.AMS gd_tc.AMS
@echo "generating groff -Tdvi dvi source"
cp gd_tc.AMS tc.AMS
( echo ".nr tM 0"; echo ".nr gR 1" ; cat manual.sed.MS $(OS_DOC) gdindex.AMS ) | \
soelim >gdmanual.AMS
rm -f tc.AMS
gdindex.AMS: gdindex i2il.awk il2doc.awk
@echo "generating groff -Tdvi index"
$(AWK) -f i2il.awk gdindex | sort -f | $(AWK) -f il2doc.awk > gdindex.AMS
gd_tc.AMS: gdindex i2tc.awk
@echo "generating groff -Tdvi table of contents"
$(AWK) -f i2tc.awk gdindex >gd_tc.AMS
gdindex: pre_tc.AMS il2doc.awk pre_ind
@echo "generating index/tc data (dvi)"
cp pre_tc.AMS tc.AMS
( echo ".nr tM 1"; echo ".nr gR 1"; cat manual.sed.MS $(OS_DOC) pre_ind ) | \
groff -z -Z -s -t -Tdvi -ms 2>gdindex
#}}}
manual.ps: gpmanual.AMS
@echo "generating ps manual"
groff -t -ms -Tps gpmanual.AMS >manual.ps
#{{{ internal rules for groff -Tps
gpmanual.AMS: check_common $(BODY) gpindex.AMS gp_tc.AMS
@echo "generating groff -Tps ps source"
cp gp_tc.AMS tc.AMS
( echo ".nr tM 0"; echo ".nr gR 1" ; cat manual.sed.MS $(OS_DOC) gpindex.AMS ) | \
soelim >gpmanual.AMS
rm -f tc.AMS
gpindex.AMS: gpindex i2il.awk il2doc.awk
@echo "generating groff -Tps index"
$(AWK) -f i2il.awk gpindex | sort -f | $(AWK) -f il2doc.awk > gpindex.AMS
gp_tc.AMS: gpindex i2tc.awk
@echo "generating groff -Tps table of contents"
$(AWK) -f i2tc.awk gpindex >gp_tc.AMS
gpindex: pre_tc.AMS il2doc.awk pre_ind
@echo "generating index/tc data (ps)"
cp pre_tc.AMS tc.AMS
( echo ".nr tM 1"; echo ".nr gR 1"; cat manual.sed.MS $(OS_DOC) pre_ind ) | \
groff -z -Z -s -t -Tps -ms 2>gpindex
#}}}
intro.ascii: intro.ms
nroff -ms intro.ms >intro.ascii
install: $(DOCS)
for i in $(DOCS); do \
$(FILE_INSTALL) -m 644 $$i $(ORIGAMI_PATH)/doc; \
done
deinstall:
for i in $(DOCS); do rm -f $(ORIGAMI_PATH)/doc/$$i; done
depend pseudo_depend:
tags:
clean:
rm -f core manual.ms manual.sed.MS *.AMS *index pre_ind pre_tc name.sed* lg.sed
clobber: clean
rm -f *.ascii *.ascii.Z *.dvi *.ps